<!-- Phan khai bao bien cuc bo-->
<?php
$arr_all_user = get_all_enduser($_SESSION['arr_all_enduser']);
$v_handler_id =0;
if(isset($_REQUEST['hdn_handler_id'])){
	$v_handler_id= intval($_REQUEST['hdn_handler_id']);
} 
$v_handle_leader_id =0;
if(isset($_REQUEST['hdn_handle_leader_id'])){
	$v_handle_leader_id= intval($_REQUEST['hdn_handle_leader_id']);
}

$v_result_doc_type = "";
if(isset($_REQUEST['hdn_handle_leader_id'])){
	$v_result_doc_type= $_REQUEST['hdn_result_doc_type'];
}

$v_cate_filter= 0;
if(isset($_REQUEST['hdn_cate_filter'])){
	$v_cate_filter = intval($_REQUEST['hdn_cate_filter']);
}
$v_recordtype_code = "";
if(isset($_REQUEST['hdn_recordtype_code'])){
	$v_recordtype_code= $_REQUEST['hdn_recordtype_code'];
}
$v_filter = "";
if(isset($_REQUEST['hdn_filter'])){
	$v_filter=_replace_bad_char(trim($_REQUEST['hdn_filter']));
}
if ($v_recordtype_id != "") {
	$v_recordtype_id = _replace_bad_char($arr_single_recordtype['PK_RECORDTYPE']);
	$v_recordtype_code = _replace_bad_char($arr_single_recordtype['PK_RECORDTYPE']);
	$v_recordtype_name = _replace_bad_char($arr_single_recordtype['C_NAME']);
	$v_recordtype_order = $arr_single_recordtype['C_ORDER'];
	$v_recordtype_status =$arr_single_recordtype['C_STATUS'];
	$v_recordtype_process_date = $arr_single_recordtype['C_PROCESS_DATE'];
	$v_recordtype_first_time_fee = $arr_single_recordtype['C_FIRST_TIME_FEE'];
	$v_recordtype_second_time_fee = $arr_single_recordtype['C_SECOND_TIME_FEE'];
	$v_recordtype_begin_record_code = $arr_single_recordtype['C_BEGIN_RECORD_CODE'];
	$v_recordtype_begin_license_number = $arr_single_recordtype['C_BEGIN_LICENSE_NUMBER'];
	$v_result_doc_type = $arr_single_recordtype['C_RESULT_DOC_TYPE'];
	$v_cate_id = $arr_single_recordtype['FK_CATE'];
	$v_handle_agency_id = $arr_single_recordtype['FK_HANDLE_AGENCY'];
	$v_handle_agency_co_id = $arr_cate_handle['FK_CATE_CO_HANDLE'];	//nieuvv--121108--ma phong ban phoi hop thu ly
	//luu danh sach id cua can bo tiep nhan
	$v_receiver_id_list = $arr_single_recordtype['FK_RECEIVER_LIST'];
	if(!is_null($v_receiver_id_list) && ($v_receiver_id_list<>"")){
		$arr_receiver = split(",",$v_receiver_id_list);
	}
	$v_handler_list_id = $arr_single_recordtype['FK_HANDLER_LIST'];
	
	//lay danh sach id cua lanh dao duyet hs lan thu nhat
	$v_handle_leader_first_id = $arr_single_recordtype['FK_HANDLE_LEADER_FIRST_TIME'];
	//echo $v_handle_leader_first_id;exit;
	if(!is_null($v_handle_leader_first_id) && ($v_handle_leader_first_id<>"")){
		$arr_handle_leader_first = split(",",$v_handle_leader_first_id);
	}
	//var_dump($arr_handle_leader_first);exit;

	//lay danh sach id cua lanh dao duyet hs lan thu hai
	$v_handle_leader_id = $arr_single_recordtype['FK_HANDLE_LEADER'];
	if(!is_null($v_handle_leader_id) && ($v_handle_leader_id<>"")){
		$arr_handle_leader = split(",",$v_handle_leader_id);
	}

	//lay danh sach id cua lanh dao duyet kq ho so lan cuoi
	$v_approve_leader_id_list = $arr_single_recordtype['FK_APPROVE_LEADER_LIST'];
	if(!is_null($v_approve_leader_id_list) && ($v_approve_leader_id_list<>"")){
		$arr_approve_leader = split(",",$v_approve_leader_id_list);
	}		
	
	$v_record_system = 	$arr_single_recordtype['C_RECORD_SYSTEM'];
	$v_is_view_on_net = $arr_single_recordtype['C_IS_VIEW_ON_NET'];
	$v_is_register_on_net = $arr_single_recordtype['C_IS_REGISTER_ON_NET'];
	$v_submit_to_leader = $arr_single_recordtype['C_SUBMIT_TO_LEADER'];
	$v_transfer_to_senior = $arr_single_recordtype['C_TRANSFER_TO_SENIOR'];
	$v_doc_with_multi_object = $arr_single_recordtype['C_DOC_WITH_MULTI_OBJECT'];
	$v_move_to_leader = $arr_single_recordtype['C_MOVE_TO_LEADER'];
	/////////LeAV-------------------------------
	$v_id_thue =$arr_single_recordtype_thue['id_thue'];
	//12092008
	$v_c_system_conf=$arr_single_recordtype_config['C_SYSTEM_CONFIG'];
	$v_arrs_configs=explode(",",$v_c_system_conf);
	//echo sizeof($v_arrs_configs).'<br/>';
	//var_dump($v_arrs_configs);
	/////////LeAV-------------------------------
	
	$v_handover_to_customer = $arr_single_recordtype['C_HANDOVER_TO_CUSTOMER'];
	$v_manage_on_post_license = $arr_single_recordtype['C_MANAGE_ON_POST_LICIENSE'];
	
	//echo '<br><br>'. 'v_move_to_leader'.$v_move_to_leader.'<br>';
}
if (($v_recordtype_id > 0) or ($v_recordtype_id <> "")){
	$v_readonly = "readonly";
}else{
	$v_readonly = "";
	$v_recordtype_order = _get_next_value("T_ONEGATE_RECORDTYPE","C_ORDER","");
	$v_recordtype_status =1;
	$v_record_system = "";
	$v_handler_list_id = "";
	$v_is_view_on_net = 1;
	$v_is_register_on_net = 1;
	$v_submit_to_leader = 1;
	$v_transfer_to_senior = 1;
	$v_doc_with_multi_object = 1;
	$v_move_to_leader = 1;
	$v_handover_to_customer = 1;
	$v_manage_on_post_license = 1;
}

$v_str_recordtype_checked="";
if ($v_recordtype_status==1){
	$v_str_recordtype_checked="checked";
}

$v_str_view_on_net_checked="";
if ($v_is_view_on_net==1){
	$v_str_view_on_net_checked="checked";
}

$v_str_register_on_net_checked="";
if ($v_is_register_on_net==1){
	$v_str_register_on_net_checked="checked";
}

$v_submit_to_leader_checked="";
if ($v_submit_to_leader==1){
	$v_submit_to_leader_checked = "checked";
}
$v_transfer_to_senior_checked="";
if ($v_transfer_to_senior==1){
	$v_transfer_to_senior_checked="checked";
}
$v_doc_with_multi_object_checked="";
if ($v_doc_with_multi_object==1){
	$v_doc_with_multi_object_checked="checked";
}
$v_move_to_leader_checked="";
if ($v_move_to_leader == 1){
	$v_move_to_leader_checked="checked";
}
//leav---------------------------------------------------
$v_check_thue_checked="";
if (!is_null($v_id_thue)){
	$v_check_thue_checked="checked";
}
//12092008
 $v_check_hs_ldpd =checkOrNoCheck($v_arrs_configs,'CHUYEN_HS_TP_LDPD');
 $v_check_trinh_ldlc=checkOrNoCheck($v_arrs_configs,'TRINH_LDLC_TP');

 //leav---------------------------------------------------
$v_handover_to_customer_checked="";
if ($v_handover_to_customer==1){
	$v_handover_to_customer_checked="checked";
}
$v_manage_on_post_license_checked="";
if ($v_manage_on_post_license==1){
	$v_manage_on_post_license_checked="checked";
}
$v_handle_agency_name = _get_item_attr_by_id($_SESSION['arr_all_unit'], $v_handle_agency_id, 'name');
$v_handle_agency_co_name = _get_item_attr_by_id($_SESSION['arr_all_unit'], $v_handle_agency_co_id, 'name');
$v_handler_name = _get_item_attr_by_id($_SESSION['arr_all_staff'], $v_handler_id, 'name');
$v_handle_leader_name = _get_item_attr_by_id($_SESSION['arr_all_staff'], $v_handle_leader_id, 'name');
$v_handle_leader_first_name = _get_item_attr_by_id($_SESSION['arr_all_staff'], $v_handle_leader_first_id, 'name');

?>
<!--bang chua tieu de cua form-->
<table width="100%" cellpadding="0" cellspacing="0">
	<tr class="large_title">
		<td><?php echo CONST_RECORDTYPE_UPDATE_TITLE; ?></td>
	</tr>
</table>
<!-- Bat cac phim: F12=true; Insert=false; Delete=false, ESC=true; Enter=true -->
<div id="hotkey" onKeyDown = "javascript:process_hot_key(true,false,false,true,true);">
<!--bang chua cac text box de nhap du lieu-->
<table width="100%" class="form_table1" border="0" cellpadding="0" cellspacing="0">
	<col width="25%"><col width="25%"><col width="25%"><col width="25%">
	<tr>
		<form action="index.php" method="post" name="f_dsp_single_recordtype">
		<input type="hidden" name="fuseaction" value="UPDATE_RECORDTYPE" >
		<input type="hidden" name="hdn_recordtype_id" value="<?php echo $v_recordtype_id ;?>" >
		<input type="hidden" name="hdn_item_id" value="<?php echo $v_recordtype_id; ?>" >
		<input type="hidden" name="hdn_item_old_agency_id" value="<?php echo $v_handle_agency_co_id; ?>" >	<!--nieuvv--121108---->
		<input type="hidden" name="hdn_result_doc_type" value="">
		<input type="hidden" name="hdn_cate" value="<?php echo $v_cate_id; ?>">
		<input type="hidden" name="hdn_cate_filter" value="<?php echo $v_cate_filter; ?>">
		<input type="hidden" name="hdn_handle_agency_id" value="<?php echo $v_handle_agency_id; ?>">
		<input type="hidden" name="hdn_handle_agency_code" value="">
		<input type="hidden" name="hdn_handle_agency_co_id" value="<?php echo $v_handle_agency_co_id; ?>">		<!--nieuvv--121108----->
		<input type="hidden" name="hdn_handle_agency_co_code" value="">		<!--nieuvv--121108----->
		<!--input type="hidden" name="hdn_receiver_id" value="<?php echo $v_receiver_id; ?>"!-->
		<input type="hidden" name="hdn_receiver_code" value=">">
		<input type="hidden" name="hdn_handler_id" value="<?php echo $v_handler_id; ?>">
		<input type="hidden" name="hdn_handler_code" value="">
		<input type="hidden" name="hdn_handle_leader_id" value="<?php echo $v_handle_leader_id; ?>">				
		<input type="hidden" name="hdn_handle_leader_code" value="">
		<!--Luu id cua lanh dao duyet lan dau!-->
		<input type="hidden" name="hdn_handle_leader_first_time_code" value="">
		<input type="hidden" name="hdn_handle_leader_first_time_id" value="<?php echo $v_handle_leader_first_id; ?>">
		<input type="hidden" name="hdn_approve_leader_id" value="<?php echo $v_approve_leader_id; ?>">
		<input type="hidden" name="hdn_approve_leader_code" value="">
		<input type="hidden" name="hdn_recordtype_code" value="<?php echo $v_recordtype_code; ?>" >
		<input type="hidden" name="hdn_recordtype_name" value="<?php echo $v_recordtype_name; ?>" >
		<input type="hidden" name="hdn_recordtype_status" value="<?php echo $v_recordtype_status; ?>" >
		<input type="hidden" name="hdn_recordtype_have_file" value="<?php echo $v_recordtype_have_file ?>" >
		<input type="hidden" name="hdn_save_and_add_new" value="<?php echo $v_save_and_add_new; ?>"> 
		<input type="hidden" name="hdn_system_id" value=""> 
		<input type="hidden" name="hdn_handler_list_id" value="<?php echo $v_handler_list_id; ?>">
		<input type="hidden" name="hdn_handler_list_co_id" value="<?php echo $v_handler_list_id; ?>">	<!--nieuvv--121108---->
		<!--Luu danh sach id cua lanh dao duyet lan cuoi!-->
		<input type="hidden" name="hdn_approve_leader_list_id" value="<?php echo $v_handler_list_id; ?>">
		<input type="hidden" name="hdn_view_on_net" value="<?php echo $v_is_view_on_net; ?>" >
		<input type="hidden" name="hdn_register_on_net" value="<?php echo $v_is_register_on_net; ?>">
		<input type="hidden" name="hdn_submit_to_leader" value="<?php echo $v_submit_to_leader; ?>">
		<input type="hidden" name="hdn_transfer_to_senior" value="<?php echo $v_transfer_to_senior; ?>">
		<input type="hidden" name="hdn_doc_with_multi_object" value="<?php echo $v_doc_with_multi_object; ?>">
		<input type="hidden" name="hdn_move_to_leader" value="<?php echo $v_move_to_leader; ?>">
		<input type="hidden" name="hdn_check_thue_status" value="-1" >
		<!--Leav_12092008-------------------------------------------------------------------------------------- -->
		<input type="hidden" name="hdn_config_recordtype" value="<?php echo $v_c_system_conf;?>" >
		<!--Leav_12092008_end-------------------------------------------------------------------------------------- -->
		<input type="hidden" name="hdn_handover_to_customer" value="<?php echo $v_handover_to_customer; ?>">
		<input type="hidden" name="hdn_manage_on_post_license" value="<?php echo $v_manage_on_post_license; ?>">
		<input type="hidden" name="hdn_filter" value="<?php echo $v_filter; ?>">
		<input type="hidden" name="hdn_num_arr_staff" value="<?php echo $v_num_arr_staff; ?>"> 
		<input type="hidden" name="hdn_staff_id_list" value="" >
	</tr>
	<tr>
		<td class="normal_label"><?php echo CONST_RECORDTYPE_CODE_LABEL; ?><small class="small_starmark">*</small></td>
		<td colspan="3"><input name="txt_code" <?php echo $v_readonly;?> type="text" class="normal_textbox" style="width:50%" value="<?php echo $v_recordtype_code; ?>" maxlength="<?php echo CONST_RECORDTYPE_CODE_MAXLENGTH; ?>" message=" <?php echo CONST_RECORDTYPE_CODE_MESSAGE;?>" optional="<?php echo CONST_RECORDTYPE_CODE_OPTIONAL;?>" onKeyDown="change_focus(document.forms(0),this)"></td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo CONST_RECORDTYPE_NAME_LABEL; ?><small class="small_starmark">*</small></td>
		<td colspan="3"><input name="txt_name" type="text" class="normal_textbox" style="width:100%" value="<?php echo $v_recordtype_name; ?>" maxlength="<?php echo CONST_RECORDTYPE_NAME_MAXLENGTH; ?>"  message=" <?php echo CONST_RECORDTYPE_NAME_MESSAGE;?>" optional="<?php echo CONST_RECORDTYPE_NAME_OPTIONAL;?>" onKeyDown="change_focus(document.forms(0),this)"></td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo CONST_CATE_LABEL;?><small class="small_starmark">*</small></td>
		<td colspan="3">
			<select class="normal_selectbox" name="sel_cate" style="width:100%"  message = "<?php echo CONST_CATE_MESSAGE; ?>" onChange="sel_onclick(this,document.forms(0).hdn_cate);">
            <option id="" value="">--<?php echo CONST_CATE_SELECT_LABEL;?>--</option>
            <?php echo _generate_select_option($arr_all_cate,'0','0','2', $v_cate_id);?>
          </select>
		</td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo _CONST_ORDER_LABEL; ?><small class="small_starmark">*</small></td>
		<td colspan="3">
			<input name="txt_order" type="text"class="short_number_textbox" value="<?php echo $v_recordtype_order; ?>" maxlength="<?php echo CONST_RECORDTYPE_ORDER_MAXLENGTH;?>"  optional=" <?php echo CONST_RECORDTYPE_OPTIONAL;?>" isnumeric="<?php echo CONST_RECORDTYPE_ISNUMERIC; ?>" min="<?php echo CONST_RECORDTYPE_ORDER_MIN; ?>" max="<?php echo CONST_RECORDTYPE_ORDER_MAX; ?>" message="<?php echo  CONST_RECORDTYPE_ORDER_MESSAGE;?>" onKeyDown="change_focus(document.forms(0),this)">
			<input type="checkbox" name="chk_status" class="normal_checkbox" <?php echo $v_str_recordtype_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_status,document.forms(0).hdn_recordtype_status)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo _CONST_STATUS_COLUMN_ACTIVE_VALUE;?></td>
		</td>
	</tr>
	<tr>
		<td colspan="5" ><hr color="#66CCFF" size="1"></td>
	</tr>
	<tr>
		<td class="normal_label" colspan="2"><?php echo CONST_HANDLE_AGENCY_LABEL;?><small class="small_starmark">*</small></td>
		<td  colspan="2">
			<input name="txt_handle_agency"  readonly="true" type="text" class="normal_textbox" size="40" value="<?php echo $v_handle_agency_name; ?>"  message="<?php echo CONST_HANDLE_AGENCY_MESSAGE; ?>" optional=" <?php echo CONST_RECORDTYPE_AGENCY_OPTIONAL;?>" onKeyDown=" change_focus(document.forms(0),this)">
			<img border="0" src="<?php echo $_ISA_IMAGE_URL_PATH;?>find.gif"  title="<?php echo  CONST_SHOW_CHOSICE_HANDLE_AGENCY?>" class="normal_image" onClick="show_modal_dialog_unit_treeview_onclick('list/recordtype/index.php','DISPLAY_ALL_UNIT', document.forms(0).txt_handle_agency,document.forms(0).hdn_handle_agency_code,document.forms(0).hdn_handle_agency_id,-1);call_if_handler_list(document.forms(0).hdn_handle_agency_id.value,document.forms(0).hdn_handler_list_id.value);document.forms(0).fuseaction.value = 'DISPLAY_SINGLE_RECORDTYPE';document.forms(0).hdn_recordtype_code;">
		</td>
	</tr>
	<tr>
		<td class="normal_label" colspan="2"><?php echo CONST_HANDLE_CATE_CO_HANDLE_LABEL;?><small class="small_starmark">*</small></td>
		<td  colspan="2">
			<input name="txt_handle_co_agency"  readonly="true" type="text" class="normal_textbox" size="40" value="<?php echo $v_handle_agency_co_name; ?>"  message="<?php echo CONST_HANDLE_AGENCY_MESSAGE; ?>" optional=" <?php echo CONST_RECORDTYPE_AGENCY_OPTIONAL;?>" onKeyDown=" change_focus(document.forms(0),this)">
			<img border="0" src="<?php echo $_ISA_IMAGE_URL_PATH;?>find.gif"  title="<?php echo  CONST_SHOW_CHOSICE_HANDLE_AGENCY?>" class="normal_image" onClick="show_modal_dialog_unit_treeview_onclick('list/recordtype/index.php','DISPLAY_ALL_UNIT', document.forms(0).txt_handle_co_agency,document.forms(0).hdn_handle_agency_co_code,document.forms(0).hdn_handle_agency_co_id,-1);call_if_handler_co_list(document.forms(0).hdn_handle_agency_co_id.value,document.forms(0).hdn_handler_list_co_id.value);document.forms(0).fuseaction.value = 'DISPLAY_SINGLE_RECORDTYPE';document.forms(0).hdn_recordtype_code;">
			</td>
	</tr>
	<tr>
		<td class="normal_label" colspan="2"><?php echo CONST_PROCES_DATE_LABEL; ?><small class="small_starmark">*</small></td>
		<td><input name="txt_process_date" type="text" class="short_number_textbox" value="<?php echo $v_recordtype_process_date; ?>" maxlength="<?php echo CONST_RECORDTYPE_PROCESS_DATE_MAXLENGTH;?>" message="<?php echo  CONST_RECORDTYPE_PROCESS_DATE_MESSAGE;?>" optional="<?php echo CONST_RECORDTYPE_OPTIONAL;?>" isnumeric="<?php echo CONST_RECORDTYPE_ISNUMERIC; ?>" min="<?php echo CONST_RECORDTYPE_PROCESS_DATE_MIN_; ?>" max="<?php echo CONST_RECORDTYPE_PROCESS_DATE_MAX; ?>" onKeyDown="change_focus(document.forms(0),this)"></td>
	</tr>
	<tr>
		<td class="normal_label" colspan="2"><?php echo CONST_RESULT_DOC_TYPE_LABEL;?><small class="small_starmark">*</small></td>
		<td  colspan="2">
			<select class="normal_selectbox" name="sel_result_doc_type" style="width:100%"  message = "<?php echo  CONST_RESULT_DOC_TYPE_MESSAGE; ?>" onChange="sel_onclick(this,document.forms(0).hdn_result_doc_type);">
            <option id="" value="">--<?php echo CONST_RESULT_DOC_TYPE_SELECT_LABEL;?>--</option>
            <?php echo _generate_select_option($arr_result_doc_type,'0','0','1', $v_result_doc_type);?>
          </select>
		</td>
	</tr>
	<tr>
		<td class="normal_label" colspan="5"><?php echo CONST_RECEIVER_LABEL;?><small class="small_starmark">*</small></td>
	</tr>	
	<tr>
		<td colspan="5">
			<!-- Bat cac phim: F12=false; Insert=true; Delete=true, ESC=false; Enter=false -->
			<div id="hotkey" onKeyDown="javascript:process_hot_key(false,true,true,false,false);">
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="5%"><col width="90%">
				<tr class="header">
					<td></td>
					<td>#</td>	
					<td><?php echo CONST_ENDUSER_NAME_LABEL; ?></td>
				</tr>
			</table>
			<div style="overflow: auto; width: 100%; height:<?php echo CONST_HEIGHT_OF_LIST?>;padding-left:0px;margin:0px">
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="5%"><col width="90%"><?php
				$v_count = sizeof($arr_all_user);
				if ($v_count >0){
					$i = 0;
					$v_old_unit_level_one_name = "";
					while($i < $v_count) {
						$v_item_id = $arr_all_user[$i][0];
						$v_item_name = $arr_all_user[$i][1];
						$v_unit_level_one_id = $arr_all_user[$i][2];
						$v_unit_level_one_name = $arr_all_user[$i][3];
						$v_unit_name = $arr_all_user[$i][4];
						$v_count_receiver = sizeof($arr_receiver);
						$v_checked = "";
						for($v_index = 0;$v_index < $v_count_receiver;$v_index++)
							if($arr_receiver[$v_index] == $v_item_id){
								$v_checked = "checked";
							}
						$v_img_url_onclick = "show_enduser_on_unit(this)";
						$v_chk_modul_id_onclick = "select_all_enduser_on_unit(this,document.all.chk_item_id)";
						$v_chk_enduser_id_onclick = "set_value_checked_checkbox_unit(this,document.all.chk_item_id,document.all.chk_unit_id)";
						$v_url = "enduser_onclick(" . "document.forms(0).hdn_item_id"  . "," . $v_item_id . "," . $v_unit_level_one_id . "," . "'DISPLAY_SINGLE_ENDUSER','" . $v_goto_url . "')";
						if ($v_current_style_name == "odd_row"){
							$v_current_style_name = "round_row";
						}else{
							$v_current_style_name = "odd_row";
						}
						if ($v_unit_level_one_name != $v_old_unit_level_one_name){?>	
							<tr class="midle_row">
								<td align="center">
									<input type="checkbox" name="chk_unit_id" value="<?php echo $v_unit_level_one_id; ?>" onClick="<?php echo $v_chk_modul_id_onclick;?>">
								</td>
								<td align="center">
									<img id="img_unit" src="<?php echo $_ISA_IMAGE_URL_PATH;?>open.gif" class="normal_image" unit="<?php echo $v_unit_level_one_id;?>" status="on" onClick="<?php echo $v_img_url_onclick;?>">
								</td>
								<td align="left" colspan="10">
									<a name="<?php echo $v_unit_level_one_id;?>"><?php echo $v_unit_level_one_name; ?>&nbsp;</a>
								</td>
							</tr><?php 
							$v_old_unit_level_one_name = $v_unit_level_one_name;
						}else{
							//$v_checked_user = "";
						}?>
						<tr id="tr_enduser" value="<?php echo $v_item_id;?>"  unit="<?php echo $v_unit_level_one_id;?>" class="<?php echo $v_current_style_name; ?>">
							<td>&nbsp;&nbsp;</td>
							<td align="center">
								<input type="checkbox" <?php echo $v_checked?> name="chk_item_id" value="<?php echo $v_item_id; ?>" unit_id="<?php echo $v_unit_level_one_id;?>" onClick="<?php echo $v_chk_enduser_id_onclick;?>">
							</td>				
							<td align="left" onclick="<?php echo $v_url;?>">
								<?php echo $v_item_name; ?>&nbsp;
							</td>
						</tr><?php 
						$i++;
					}	
				}
				if ($v_current_style_name == "odd_row"){
					$v_next_style_name = "round_row";
				}else{
					$v_next_style_name = "odd_row";
				}
				echo _add_empty_row($v_count,_CONST_NUMBER_OF_ROW_PER_LIST,$v_current_style_name,$v_next_style_name,3);?>
			</table>
			</div>	
			<!--Table chua cac nut Show_all va Hide_all-->
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr><?php 
					if ($v_count>0){?>
					<td class="small_radiobutton" colspan="10" width="50%" height="25">
						<input type="radio" id="rad_show_enduser" value="1" checked onClick="show_or_hide_all_enduser('SHOW_ALL',document.all.tr_enduser,document.all.img_unit,document.all.rad_show_enduser)" ><?php echo CONST_SHOW_ALL_ENDUSER;?>
					</td>
					<td class="small_radiobutton" colspan="10" width="50%" height="25">
						<input type="radio" id="rad_show_enduser" value="2" onClick="show_or_hide_all_enduser('HIDE_ALL',document.all.tr_enduser,document.all.img_unit,document.all.rad_show_enduser)"><?php echo CONST_HIDE_ALL_ENDUSER;?>
					</td><?php
					}else{?>
						<td>&nbsp;</td>
					<?php
					}?>
				</tr>
			</table>						
		</td>	
	</tr>
	<tr>
		<td colspan="5" ><hr color="#66CCFF" size="1"></td>
	</tr>
	<tr>
		<td colspan="5"class="normal_label"><?php echo CONST_HANDLER_LIST_LABEL?></td>
	</tr>
	<tr  id="tr_list_all_staff">
		<td colspan="5">
			<IFRAME
				id="if_handler_list"
				NAME="if_handler_list"
				FRAMEBORDER=0
				SCROLLING=NO
				HEIGHT = 175pt
				WIDTH = 100%
				ALIGN = BASELINE
				MARGINHEIGHT = 0
				MARGINWIDTH = 0
				SRC="index.php?fuseaction=DISPLAY_ALL_STAFF_BY_AGENCY&modal_dialog_mode=1&allow_editing_in_modal_dialog=1"> 
			</IFRAME>
		</td>
	</tr>
	<tr>
		<td colspan="5"class="normal_label"><?php echo CONST_HANDLER_LIST_CO_LABEL?></td>
	</tr>
	<tr  id="tr_list_all_staff_co">
		<td colspan="5">
			<IFRAME
				id="if_handler_list_co"
				NAME="if_handler_list_co"
				FRAMEBORDER=0
				SCROLLING=NO
				HEIGHT = 175pt
				WIDTH = 100%
				ALIGN = BASELINE
				MARGINHEIGHT = 0
				MARGINWIDTH = 0
				SRC="index.php?fuseaction=DISPLAY_ALL_STAFF_CO_BY_AGENCY&modal_dialog_mode=1&allow_editing_in_modal_dialog=1"> 
			</IFRAME>
		</td>
	</tr>
	<tr>
		<td colspan="5" ><hr color="#66CCFF" size="1"></td>
	</tr>
	<!--Lanh dao phu trach phe duyet lan thu nhat!-->
	<tr>
		<td class="normal_label" colspan="5"><?php echo CONST_HANDLE_LEADER_FIRST_TIME_LABEL;?><small class="small_starmark">*</small></td>
	</tr>
	<tr>
		<td colspan="5">
			<!-- Bang chua tieu de cua danh sach-->		
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="55%"><col width="40%">
				<tr class="header">
					<td align="center"><?php echo "#"; ?></td>
					<td align="center"><?php echo CONST_LEADER_NAME_TITLE; ?></td>
					<td align="center"><?php echo CONST_LEADER_POSITION_TITLE; ?></td>
				</tr>
			</table>	
		</td>	
	</tr>	
	<tr>
		<!--<td class="normal_label" colspan="2"><?php //echo CONST_HANDLE_LEADER_FIRST_TIME_LABEL;?><small class="small_starmark">*</small></td>
		<td  colspan="2">
			<input name="txt_handle_leader_first_time"  readonly="true" type="text" class="normal_textbox" size="35" value="<?php //echo $v_handle_leader_first_name; ?>"  message="<?php //echo  CONST_HANDLE_LEADER_MESSAGE;?>" optional="<?php  //echo CONST_RECORDTYPE_OPTIONAL;?>" onKeyDown="  change_focus(document.forms(0),this)">
			<img border="0" src="<?php //echo $_ISA_IMAGE_URL_PATH;?>find.gif" width="18" height="18" title="<?php  //echo CONST_SHOW_CHOSICE_HANDLE_LEADER?>" class="normal_image" onClick="show_modal_dialog_treeview_onclick('list/recordtype/index.php' ,'DISPLAY_ALL_HANDLE_LEADER',document.forms(0).txt_handle_leader_first_time,document.forms(0).hdn_handle_leader_first_time_code,document.forms(0).hdn_handle_leader_first_time_id,-1);document.forms(0).fuseaction.value = 'DISPLAY_SINGLE_RECORDTYPE';">
			<img border="0" src="<?php //echo $_ISA_IMAGE_URL_PATH;?>delete.gif" width="18" height="18" title="<?php  //echo CONST_SHOW_CHOSICE_HANDLE_LEADER?>" class="normal_image" onclick="delete_hande_approve_leader(document.forms(0).hdn_handle_leader_first_time_id,document.forms(0).txt_handle_leader_first_time);">
		</td>-->
		<td colspan="5">
			<div style="overflow: auto; width: 100%; height:<?php echo '190';?>;padding-left:0px;margin:0px">
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="55%"><col width="40%">
					<?php	
					$arr_code = get_all_leader_by_code('LANH_DAO_UB,LANH_DAO_PHONG_BAN');				
					$v_count = sizeof($arr_code);		
					for($row_index =0;$row_index<$v_count;$row_index++){	
						$v_staff_id=$arr_code[$row_index][0];//id cua leader
						$v_leader_name=$arr_code[$row_index][3];//ten cua leader
						$v_position_name=$arr_code[$row_index][1];//chuc vu
						//dem xem co bao nhieu lanh dao duyet thu ly lan 1					
						$v_count_approve = sizeof($arr_handle_leader_first);
						$v_checked = "";
						for($v_i = 0;$v_i < $v_count_approve;$v_i++){
							if($arr_handle_leader_first[$v_i] == $v_staff_id){
								$v_checked = "checked";
							}
						}
						if ($v_current_style_name == "odd_row"){
							$v_current_style_name = "round_row";
						}else{
							$v_current_style_name = "odd_row";
						}			
						?>
						<tr class="<?php echo $v_current_style_name ?>"> 
							<td>
								<input type="checkbox" <?php echo $v_checked;?> name="chk_hander_leader_first_time_id_list" value="<?php echo $v_staff_id;?>">
							</td>											
							<td>
								<?php echo $v_leader_name;?>&nbsp;
							</td>
							<td>
								<?php echo $v_position_name; ?>&nbsp;
							</td>	
						</tr><?php
						}			
					if ($v_current_style_name == "odd_row"){
						$v_next_style_name = "round_row";
					}else{
						$v_next_style_name = "odd_row";
					}
					echo _add_empty_row($v_count,$v_count,$v_current_style_name,$v_next_style_name,3);?>				
			</table>	
		</td>
	</tr>
	<tr>
		<td class="normal_label" colspan="2"><?php echo CONST_HANDLE_LEADER_LABEL;?><small class="small_starmark">*</small></td>
	</tr>
	<tr>
		<td colspan="5">
			<!-- Bang chua tieu de cua danh sach-->		
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="55%"><col width="40%">
				<tr class="header">
					<td align="center"><?php echo "#"; ?></td>
					<td align="center"><?php echo CONST_LEADER_NAME_TITLE; ?></td>
					<td align="center"><?php echo CONST_LEADER_POSITION_TITLE; ?></td>
				</tr>
			</table>	
		</td>	
	</tr>	
	<tr>
		<!--<td class="normal_label" colspan="2"><?php //echo CONST_HANDLE_LEADER_LABEL;?><small class="small_starmark">*</small></td>
		<td  colspan="2">
			<input name="txt_handle_leader"  readonly="true" type="text" class="normal_textbox" size="35" value="<?php //echo $v_handle_leader_name; ?>"  message="<?php //echo  CONST_HANDLE_LEADER_MESSAGE;?>" optional="<?php  //echo CONST_RECORDTYPE_OPTIONAL;?>" onKeyDown="  change_focus(document.forms(0),this)">
			<img border="0" src="<?php //echo $_ISA_IMAGE_URL_PATH;?>find.gif" width="18" height="18" title="<?php  //echo CONST_SHOW_CHOSICE_HANDLE_LEADER?>" class="normal_image" onClick="show_modal_dialog_treeview_onclick('list/recordtype/index.php' ,'DISPLAY_ALL_HANDLE_LEADER',document.forms(0).txt_handle_leader,document.forms(0).hdn_handle_leader_code,document.forms(0).hdn_handle_leader_id,-1);document.forms(0).fuseaction.value = 'DISPLAY_SINGLE_RECORDTYPE';">
			<img border="0" src="<?php //echo $_ISA_IMAGE_URL_PATH;?>delete.gif" width="18" height="18" title="<?php  //echo CONST_SHOW_CHOSICE_HANDLE_LEADER?>" class="normal_image" onclick="delete_hande_approve_leader(document.forms(0).hdn_handle_leader_id,document.forms(0).txt_handle_leader);">
		</td>-->
		<td colspan="5">
			<div style="overflow: auto; width: 100%; height:<?php echo '190';?>;padding-left:0px;margin:0px">
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="55%"><col width="40%">
					<?php	
					$arr_code = get_all_leader_by_code('LANH_DAO_UB,LANH_DAO_PHONG_BAN');				
					$v_count = sizeof($arr_code);		
					for($row_index =0;$row_index<$v_count;$row_index++){	
						$v_staff_id=$arr_code[$row_index][0];//id cua leader
						$v_leader_name=$arr_code[$row_index][3];//ten cua leader
						$v_position_name=$arr_code[$row_index][1];//chuc vu
						//dem xem co bao nhieu lanh dao duyet thu ly lan 1					
						$v_count_approve = sizeof($arr_handle_leader);
						$v_checked = "";
						for($v_i = 0;$v_i < $v_count_approve;$v_i++){
							if($arr_handle_leader[$v_i] == $v_staff_id){
								$v_checked = "checked";
							}
						}
						if ($v_current_style_name == "odd_row"){
							$v_current_style_name = "round_row";
						}else{
							$v_current_style_name = "odd_row";
						}			
						?>
						<tr class="<?php echo $v_current_style_name ?>"> 
							<td>
								<input type="checkbox" <?php echo $v_checked;?> name="chk_hander_leader_id_list" value="<?php echo $v_staff_id;?>">
							</td>											
							<td>
								<?php echo $v_leader_name;?>&nbsp;
							</td>
							<td>
								<?php echo $v_position_name; ?>&nbsp;
							</td>	
						</tr><?php
						}			
					if ($v_current_style_name == "odd_row"){
						$v_next_style_name = "round_row";
					}else{
						$v_next_style_name = "odd_row";
					}
					echo _add_empty_row($v_count,$v_count,$v_current_style_name,$v_next_style_name,3);?>				
			</table>	
		</td>
	</tr>	
	<tr style="display:none">
		<td class="normal_label" colspan="2"><?php echo CONST_APPROVE_LEADER_LABEL;?><small class="small_starmark">*</small></td>
		<td  colspan="2">
			<input name="txt_approve_leader" readonly="true" type="text" class="normal_textbox" size="35" value="<?php echo $v_approve_leader_name; ?>"  message="<?php echo  CONST_APPROVE_LEADER_MESSAGE;?>" optional="<?php  echo CONST_RECORDTYPE_OPTIONAL;?>" onKeyDown=" change_focus(document.forms(0),this)">
			<img border="0" src="<?php echo $_ISA_IMAGE_URL_PATH;?>find.gif" width="18" height="18" title="<?php  echo CONST_SHOW_CHOSICE_APPROVE_LEADER?>" class="normal_image" onClick="show_modal_dialog_treeview_onclick('list/recordtype/index.php', 'DISPLAY_ALL_APPROVE_LEADER',document.forms(0).txt_approve_leader,document.forms(0).hdn_approve_leader_code,document.forms(0).hdn_approve_leader_id,-1);document.forms(0).fuseaction.value = 'DISPLAY_SINGLE_RECORDTYPE';">
			<img border="0" src="<?php echo $_ISA_IMAGE_URL_PATH;?>delete.gif" width="18" height="18" title="<?php  echo CONST_SHOW_CHOSICE_HANDLE_LEADER?>" class="normal_image" onclick="delete_hande_approve_leader(document.forms(0).hdn_approve_leader_id,document.forms(0).txt_approve_leader);">
		</td>
	</tr>
	<tr>
		<td class="normal_label" colspan="5"><?php echo CONST_APPROVE_LEADER_LABEL;?><small class="small_starmark">*</small></td>
	</tr>
	<tr>
		<td colspan="5">
			<!-- Bang chua tieu de cua danh sach-->		
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="55%"><col width="40%">
				<tr class="header">
					<td align="center"><?php echo "#"; ?></td>
					<td align="center"><?php echo CONST_LEADER_NAME_TITLE; ?></td>
					<td align="center"><?php echo CONST_LEADER_POSITION_TITLE; ?></td>
				</tr>
			</table>	
		</td>	
	</tr>	
	<tr>
		<td colspan="5">
			<div style="overflow: auto; width: 100%; height:<?php echo '190';?>;padding-left:0px;margin:0px">
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<col width="5%"><col width="55%"><col width="40%">
					<?php	
					$arr_code = get_all_leader_by_code('LANH_DAO_UB,LANH_DAO_PHONG_BAN');
					
					$v_count = sizeof($arr_code);		
					for($row_index =0;$row_index<$v_count;$row_index++){	
						$v_staff_id=$arr_code[$row_index][0];//id cua leader
						$v_leader_name=$arr_code[$row_index][3];//ten cua leader
						$v_position_name=$arr_code[$row_index][1];//chuc vu
						//dem xem co bao nhieu lanh dao duyet lan cuoi
						$v_count_approve = sizeof($arr_approve_leader);
						$v_checked = "";
						for($v_i = 0;$v_i < $v_count_approve;$v_i++){
							if($arr_approve_leader[$v_i] == $v_staff_id){
								$v_checked = "checked";
							}
						}
						if ($v_current_style_name == "odd_row"){
							$v_current_style_name = "round_row";
						}else{
							$v_current_style_name = "odd_row";
						}			
						?>
						<tr class="<?php echo $v_current_style_name ?>"> 
							<td>
								<input type="checkbox" <?php echo $v_checked;?> name="chk_leader_id_list" value="<?php echo $v_staff_id;?>">
							</td>											
							<td>
								<?php echo $v_leader_name;?>&nbsp;
							</td>
							<td>
								<?php echo $v_position_name; ?>&nbsp;
							</td>	
						</tr><?php
						}			
					if ($v_current_style_name == "odd_row"){
						$v_next_style_name = "round_row";
					}else{
						$v_next_style_name = "odd_row";
					}
					echo _add_empty_row($v_count,$v_count,$v_current_style_name,$v_next_style_name,3);?>				
			</table>	
		</td>
	</tr>
	<tr>
		<td colspan="5" ><hr color="#66CCFF" size="1"></td>
	</tr>
		<td class="normal_label"><?php echo CONST_FIRST_TIME_FEE_LABEL; ?></td>
		<td><input name="txt_first_time_fee" type="text"  class="short_number_textbox" style="width:60%" value="<?php echo $v_recordtype_first_time_fee; ?>" message="<?php echo  CONST_RECORDTYPE_FIRST_TIME_FEE_MESSAGE;?>" optional="<?php echo  CONST_RECORDTYPE_OPTIONAL;?>" isnumeric="<?php echo  CONST_RECORDTYPE_ISNUMERIC; ?>"  onKeyDown="change_focus( document.forms(0),this)">&nbsp;&nbsp;<?php echo CONST_CURRENCY_LABEL;?></td>
		<td class="normal_label"><?php echo CONST_SECOND_TIME_FEE_LABEL; ?></td>
		<td><input name="txt_second_time_fee" type="text"  class="short_number_textbox" style="width:60%" value="<?php echo $v_recordtype_second_time_fee; ?>" message="<?php echo  CONST_RECORDTYPE_SECOND_TIME_FEE_MESSAGE;?>" optional="<?php  echo CONST_RECORDTYPE_OPTIONAL;?>" isnumeric="<?php  echo CONST_RECORDTYPE_ISNUMERIC; ?>"  onKeyDown="change_focus( document.forms(0),this)">&nbsp;&nbsp;<?php echo CONST_CURRENCY_LABEL;?></td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo CONST_BEGIN_RECORD_CODE_LABEL; ?></td>
		<td><input name="txt_begin_recod_code" type="text" class="short_number_textbox" style="width:60%" value="<?php echo $v_recordtype_begin_record_code; ?>" message="<?php echo  CONST_RECORDTYPE_BEGIN_RECORD_CODE_MESSAGE;?>" optional="<?php echo CONST_RECORDTYPE_OPTIONAL;?>" isnumeric="<?php echo CONST_RECORDTYPE_ISNUMERIC; ?>"  onKeyDown="change_focus(document.forms(0),this)"></td>
		<td class="normal_label"><?php echo CONST_BEGIN_LICENSE_NUMBER_LABEL; ?></td>
		<td><input name="txt_begin_license_number" type="text"  class="short_number_textbox" style="width:60%" value="<?php echo $v_recordtype_begin_license_number; ?>" message="<?php  echo CONST_RECORDTYPE_BEGIN_LICENSE_NUMBER_MESSAGE;?>" optional="<?php echo CONST_RECORDTYPE_OPTIONAL;?>" isnumeric="<?php echo CONST_RECORDTYPE_ISNUMERIC; ?>"  onKeyDown="change_focus(document.forms(0),this)"></td>
	</tr>
	<tr style="display:block">
		<td colspan="5"class="normal_label"><?php echo CONST_FUNCTION_SYSTEM_LABEL?></td>
	</tr>
	<tr style="display:block">
		<td colspan="10"class="normal_label"><?php echo Generate_Multi_Checkbox_List($arr_system_function,'0','1',$v_record_system,'chk_fuction_system','"tr_function_system_name"','"rad_function_system_name"'); ?></td>
	</tr>
	<tr>
		<td colspan="5" ><hr color="#66CCFF" size="1"></td>
	</tr>
	<tr>
		<td colspan="5">
			<table class="list_table2" width="100%" cellpadding="0" cellspacing="0">
				<tr class="odd_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_view" class="normal_checkbox" <?php echo $v_str_view_on_net_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_view,document.forms(0).hdn_view_on_net)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_IS_VIEW_ON_NET_LABEL;?></td>
				</tr>
				<tr class="round_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_register" class="normal_checkbox" <?php echo $v_str_register_on_net_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_register,document.forms(0).hdn_register_on_net)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_IS_REGISTER_ON_NET_LABEL;?></td>
				</tr class="round_row">
				<tr class="odd_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_submit_to_leader" class="normal_checkbox" <?php echo $v_submit_to_leader_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_submit_to_leader,document.forms(0).hdn_submit_to_leader)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_SUBMIT_TO_LEADER_LABEL;?></td>
				</tr>
				<tr class="round_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_transfer_to_senior" class="normal_checkbox" <?php echo $v_transfer_to_senior_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_transfer_to_senior,document.forms(0).hdn_transfer_to_senior)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_TRANSFER_TO_SENIOR_LABEL;?></td>
				</tr>
				<tr class="odd_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_handover_to_customer" class="normal_checkbox" <?php echo $v_handover_to_customer_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_handover_to_customer,document.forms(0).hdn_handover_to_customer)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_HANDOVER_TO_CUSTOMER_LABEL;?></td>
				</tr>
				<tr class="round_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_manage_on_post_license" class="normal_checkbox" <?php echo $v_manage_on_post_license_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_manage_on_post_license,document.forms(0).hdn_manage_on_post_license)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_MANAGE_ON_POST_LICIENSE_LABEL;?></td>
				</tr>				
				<tr class="odd_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_doc_with_multi_object" class="normal_checkbox" <?php echo $v_doc_with_multi_object_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_doc_with_multi_object,document.forms(0).hdn_doc_with_multi_object)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_DOC_WITH_MULTI_OBJECT_LABEL;?></td>
				</tr>
				<tr class="odd_row">
					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_move_to_leader" class="normal_checkbox" <?php echo $v_move_to_leader_checked;?> onClick="btn_single_checkbox_onclick(document.forms(0).chk_move_to_leader,document.forms(0).hdn_config_recordtype)" onKeyDown=" change_focus(document.forms(0),this)"> <?php echo CONST_MOVE_TO_LEADER;?></td>
				</tr>
				<!-- Leav_update_12092008-->
				<tr class="odd_row">
  					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_chuyen_hs_ldpd" class="normal_checkbox" <?php echo $v_check_hs_ldpd;?> value="CHUYEN_HS_TP_LDPD" onClick="btn_single_checkbox_onclick_conf(document.forms(0).chk_chuyen_hs_ldpd,document.forms(0).hdn_config_recordtype)"
 onKeyDown=" change_focus(document.forms(0),this)"> 
 <?php echo CONST_IS_CHECK_CHUYEN_HS_DA_NHAN_BL_THUE_PHAT;?>
   					</td>
				</tr>
				<tr class="odd_row">
  					<td class="normal_label" colspan="4"><input type="checkbox" name="chk_trinh_ldlc" class="normal_checkbox" <?php echo $v_check_trinh_ldlc;?> value="TRINH_LDLC_TP" onClick="btn_single_checkbox_onclick_conf(document.forms(0).chk_trinh_ldlc,document.forms(0).hdn_config_recordtype)"
 onKeyDown=" change_focus(document.forms(0),this)"> 
 <?php echo CONST_IS_CHECK_TRINH_LD_LAN_CUOI_PD_THUE_PHAT;?>
   					</td>
				</tr>
				<!-- leavb-->
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="5"></td>
	</tr>	
</table>

<!--bang chua cac button-->
<table width="100%" >
	<tr>
		<td align="center" width="100%" height="40" valign="bottom"><?php
			if ($v_is_granted_update){?>
				<input type="button" name="btn_save"  class="normal_button" value="<?php echo _CONST_SAVE_BUTTON;?>" onClick="save_hidden_list_item_id(document.forms(0).hdn_handle_leader_first_time_id,document.forms(0).chk_hander_leader_first_time_id_list);save_hidden_list_item_id(document.forms(0).hdn_handle_leader_id,document.forms(0).chk_hander_leader_id_list);save_hidden_list_item_id(document.forms(0).hdn_approve_leader_list_id,document.forms(0).chk_leader_id_list);save_hidden_list_item_id(document.forms(0).hdn_system_id,document.forms(0).chk_fuction_system);save_hidden_list_item_id(document.forms(0).hdn_handler_list_id,window.frames['if_handler_list'].document.forms[0].chk_handler_list_id);save_hidden_list_item_id(document.forms(0).hdn_handler_list_co_id,window.frames['if_handler_list_co'].document.forms[0].chk_handler_list_co_id);save_hidden_list_item_id(document.forms(0).hdn_staff_id_list,document.forms(0).chk_item_id);btn_save_onclick('UPDATE_RECORDTYPE');" onKeyDown = "change_focus(document.forms(0),this)"><?php
			}?>
				<input type="button" name="btn_back" class="normal_button" value="<?php echo _CONST_BACK_BUTTON;?>" onClick="btn_back_onclick('DISPLAY_ALL_RECORDTYPE');" onKeyDown = "change_focus(document.forms(0),this)">	
		</td>
	</tr>
</table>					
</div>
</form>

<script language="JavaScript">
	set_focus(document.forms(0));
	window.dialogHeight = "340pt";
	window.dialogWidth = "420pt";
	window.dialogTop = "80pt";
	call_if_handler_list(document.forms(0).hdn_handle_agency_id.value,document.forms(0).hdn_handler_list_id.value);
	call_if_handler_co_list(document.forms(0).hdn_handle_agency_co_id.value,document.forms(0).hdn_handler_list_co_id.value);
</script>
